from rest_framework.viewsets import ModelViewSet
from books.serializers import BookSerializer
from books.models import BookInfo


class BooksView(ModelViewSet):
    serializer_class = BookSerializer
    queryset = BookInfo.objects.all()

    # 按照视图限流  指定视图的限流名称
    throttle_scope = 'books'
